import java.util.Map;
import java.util.Set;
import java.util.Collection;

import java.util.Hashtable;
import java.util.Iterator;
import java.util.Set;
import java.util.HashSet;
import java.util.Enumeration;

import java.util.*;

/**
* user defind class DattaMap implemented  Map interface.
* It also override the all implemented methods of the Map Interface.
*
*@author Dattatraya Kunde.
*/
class DattaMap implements Map{
	/**
	*temparary data structure ues to store the data. 
	*/
	String[] keyArray;
	String[] valueArray;
	static  int cnt;

	public DattaMap(){
		this.valueArray = new String[20];
		this.keyArray=new String[20];				

                for(int i=0;i<20;i++){
                        this.valueArray[i]="\0";
			this.keyArray[i]="\0";
		}
                this.cnt=0;


	}

	//************** Implemented method of map interface	**************//
	

	/**
	*remove all mappings from the Map
	*/
	public void clear() {
		this.valueArray = new String[20];
		this.keyArray=new String[20];				

                for(int i=0;i<20;i++){
                        this.valueArray[i]="\0";
			this.keyArray[i]="\0";
		}
                this.cnt=0;

	}

	/**
	*Check whether the perticular key is present in the Map or not
	* returns true if this mao contains the specified key
	*/
	public boolean containsKey(Object key) {
		 
		return true;
	}

	
	/**
	*Check whether the perticular value is present in the Map or not.
	* returns true if this map contains the specific value.
	*/
	public boolean containsValue(Object value) {
		return true;
	}

	/** 
	*Returns the collection view of the Map ]
	*/
	public Set entrySet() {

		return  null;
	}

	/**
	*Getting the value which this map maps the specified key.
	*/
	public Object get(Object key) {
		for(int i=0;i<keyArray.length;i++)
                {
                        if(keyArray[i].equals((String)key))
                        {
                          return valueArray[i];
                        }
                }
                
                return null;


	}

	/**
	*check whether the Map is empty or not
	*Returs true if this Map does not contain any mapping
	*/
	public boolean isEmpty() {
		return this.size() == 0;
				
	}

	/**
	*Returns a set view of the keys contained in this map 
  	*/
	public Set keySet() {
		
             	return null;
		

	}

	/**
	*Insert or assign the value to the specified key in the map one at a time.
	*/
	public Object put(Object hashkey, Object value) {
		boolean flag=false;
                for(int i=0;i<cnt;i++)
                {
                        if(keyArray[i].equals(keyArray))
                        {
                                flag=true;
				System.out.println("Key is dulpicate");
                        }
                }
                if(flag==false)
                {
                        keyArray[cnt]=(String)hashkey;
                        valueArray[cnt]=(String)value;
                        cnt++;
                        return (String)hashkey;
                }
                return null;
        }
        
       
	/**
	*Insert the set of mapping of keys and values in the map 
	*/
	public void putAll(Map m) {
		}

	/**
	*Remove the mapping which is associated from the specified key
	*/
	public Object remove(Object key) {
		
	}

	/**
	*To calculate the key-value mapping in this Map
	*/
	public int size(){
		return cnt;
	}
	
	/**
	*Returns a collection values contained in this Map. 
	*/
	public Collection values() {

		// return  this.hashTable.values();
		return null;
		
	}



}
